//
//  BIZSitcomIntroduceTableViewCell.m
//  biz
//
//  Created by zhangfuwei on 2017/3/24.
//  Copyright © 2017年 jieshuibao. All rights reserved.
//

#import "BIZSitcomIntroduceTableViewCell.h"
static CGFloat kEdgeOffset = 20;

@implementation BIZSitcomIntroduceTableViewCell{
    UILabel *_sitcomIntroduceLab;
}

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self reloadUI];
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        self.backgroundColor = [UIColor whiteColor];
    }
    return self ;
}

- (void)reloadUI {
    _sitcomIntroduceLab = [[UILabel alloc] init];
    _sitcomIntroduceLab.textColor = COLOR_WORD_BLACK;
    _sitcomIntroduceLab.font = CHINESE_SYSTEM(14);
    _sitcomIntroduceLab.numberOfLines = 0;
    _sitcomIntroduceLab.backgroundColor = [UIColor whiteColor];
    
    [self.contentView addSubview:_sitcomIntroduceLab];
}

-(void)layoutSubviews {
    [super layoutSubviews];

    [_sitcomIntroduceLab mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.bottom.equalTo(self.contentView);
        make.left.equalTo(self.contentView).offset(kEdgeOffset);
        make.right.equalTo(self.contentView).offset(-1*kEdgeOffset);
    }];
}

-(void)setSitcomIntroduce:(NSString *)sitcomIntroduce {
    _sitcomIntroduce = sitcomIntroduce;
    _sitcomIntroduceLab.text = sitcomIntroduce;
    // MARK:TO DO 设置行间距, 首行空格

    [self layoutIfNeeded];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
